home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / arttiml.dir / 00013_Script_TIMELINE MOVEMENTS 1 < prev    next >
Text File  |  1996-06-16  |  2KB  |  59 lines

  1. -- -----------------------------------------------------------
  2. -- Handler goForwardInTime takes the user to the next frame
  3. -- of the time period.  This assumes that frames are ordered
  4. -- such that frame F contains the dates and the events
  5. -- that occured and frame (F+1) contains the dates only.
  6. -- (Similarly, frame (F+2) contains the dates and events
  7. -- of the next screen, frame (F+3) contains only the dates
  8. -- of the next screen...)
  9.  
  10. on goForwardInTime newFrame
  11.   global thumb,firstTimeScreenframe,framesBetweenScreens
  12.   if voidP(newFrame) then set newFrame = the frame + 2
  13.   puppetSound "sound"
  14.   updateStage
  15.   hideTimePeriods -- if it appears on the stage
  16.   set currentFrame = the frame
  17.   go currentFrame + 1 -- current frame with just dates
  18.   puppetTransition 11, 4, 16 -- Push Left
  19.   go currentFrame + 3 -- dates of next screen in period
  20.   go newFrame -- dates and events of next screen
  21.   
  22.   updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  23.   
  24. end
  25.  
  26. -- -----------------------------------------------------------
  27. -- Handler goBackInTime takes the user to the next frame
  28. -- of the time period.  This assumes that frames are ordered
  29. -- such that frame F contains the dates and the events
  30. -- that occured and frame (F+1) contains the dates only.
  31. -- (Similarly, frame (F+2) contains the dates and events
  32. -- of the next screen, frame (F+3) contains only the dates
  33. -- of the next screen...)
  34.  
  35. on goBackInTime newFrame
  36.   global thumb,firstTimeScreenframe,framesBetweenScreens
  37.   if voidP(newFrame) then set newFrame = the frame - 2
  38.   puppetSound "sound"
  39.   updateStage
  40.   hideTimePeriods -- if it appears on the stage
  41.   set currentFrame = the frame
  42.   go currentFrame + 1 -- current frame with just dates
  43.   puppetTransition 12, 4, 16 -- Push Right
  44.   go currentFrame - 1 -- dates of previous screen in period
  45.   go newFrame -- dates and events of previous screen
  46.   
  47.   updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  48.   
  49. end
  50.  
  51.  
  52. -- snap thumb to position
  53. on updateThumb thumb,firstTimeScreenframe,framesBetweenScreens
  54.   set currentScreenNum = (the frame - firstTimeScreenframe) / framesBetweenScreens + 1
  55.   set newThumbPos = getThumbPosFromScreenNum(currentScreenNum)
  56.   updateLocHOfItem thumb,newThumbPos
  57.   
  58. end
  59.